home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / documents / Dwarf / README < prev   
Encoding:
Text File  |  1994-08-02  |  6.2 KB  |  158 lines

  1.  
  2.                     ~4Dgifts/toolbox/documents/dwarf README
  3.  
  4.  
  5.   `!' indicates new or updated as of version 4.2
  6.  
  7.  
  8.      For further reference, also see toolbox/FAQs/SGIfaqs/Dwarf-faq,
  9.  !   and the new libdwarf src (for IRIX 6) subtree in src/swtools/libdwarf.
  10.  
  11.  
  12.      DWARF is a binary debugging-information-format.  It defines, in detail,
  13.      a way for compilers to tell debuggers about source programs.
  14.  
  15.      DWARF1 is the DWARF produced by USL's SVR4 compilers and used by their
  16.      debuggers.   It is no more capable than the MIPS mdebug symbol table
  17.      and is less dense than mdebug. We will not use DWARF1.
  18.  
  19.      SGI will be using DWARF 2.  It is capable of recording much more
  20.      detailed information than DWARF 1 and is far more compact (debugging
  21.      information in DWARF2 format takes much less space on disk than
  22.      debugging information in DWARF1 format).
  23.  
  24.  
  25.  
  26.  !   dwarf.v2.ps:  "DWARF Debugging Information Format," 108 pages
  27.  
  28.        FOREWARD  
  29.  
  30.        This document specifies the second generation of symbolc debugging
  31.        information based on the DWARF format that has been developed by
  32.        the UNIX International Programming Languages Special Interest Group
  33.        (SIG).  It is being circulated for industry review.  The first
  34.        version of the DWARF specification was published by UNIX 
  35.        International in January, 1992.  The current version adds 
  36.        significant new functionality, but its main thrust is to acheive
  37.        a much denser encoding the DWARF information.  Because of the new
  38.        encoding, DWARF version 2 is not binary compatible with DWARF
  39.        version 1.
  40.  
  41.        As this point, the SIG believes that this document sufficiently 
  42.        supports the debugging needs of C, C++, FORTRAN 77, Fortran90,
  43.        Modula2, and Pascal, and we have released it for public comment.
  44.        We will accept comments on this document until September 30, 1994.
  45.        Comments may be directed via email to the SIG mailing list 
  46.        (plsig@ui.org).  If you are unable to send email, paper mail, FAX,
  47.        or machine readable copy on UNIX, MS-DOS, or Macintosh compatible
  48.        media can be sent to UNIX International at the address listed 
  49.        below, and wil be forwarded to the SIG.
  50.  
  51.                                            UNIX International
  52.                                            Waterview Corporate Center
  53.                                            20 Waterview Boulevard
  54.                                            Parsippany, NJ 07054
  55.                                            Phone:  +1 201-263-8400
  56.                                            Fax:    +1 201-263-8401
  57.  
  58.               NOTE:  Table of Contents is on page 105
  59.                  List of Figures is on page 107
  60.               108 pages
  61.  
  62.  
  63.  !   index.v2.ps:     3-page index
  64.  
  65.  
  66.  !   libdwarf2.1.ps:  ABSTRACT:  This document describes an interface to a 
  67.               library of functions to access DWARF debugging 
  68.               information entries and DWARF line number information.  
  69.               It does not make recommendations as to how the functions 
  70.               described in this document should be implemented nor 
  71.               does it suggest possible optimizations.
  72.  
  73.               The document is oriented to reading DWARF version 2.  
  74.               There are certain sections which are SGI-specific (those
  75.               are clearly indentified in the document).  We intend to
  76.               propose this to the PLSIG committee as the basis for a
  77.               standard libdwarf interface.
  78.  
  79.               The proposals made in this document are subject to 
  80.               change.
  81.  
  82.               47 pages
  83.               NOTE:  CONTENTS is on page 45
  84.                  LIST OF FIGURES is on page 46
  85.                  ABSTRACT is on page 47
  86.  
  87.  !   libdwarf2p.1.ps:  "A Producer Library Interface to DWARF"
  88.                17 pages
  89.                NOTE:  CONTENTS is on page 16
  90.  
  91.  
  92.  
  93.  
  94. ______________________________________________________________________________
  95.  
  96.        from the toolbox/FAQs/SGIfaqs/dwarf-faq file:
  97.  
  98.  
  99.  
  100.    4) An Overview of Dwarf Information Content
  101.    
  102.    The documents mentioned in section 3 are long on details and short
  103.    on overview.  Lets try to put this all in to a total picture.
  104.    
  105.    To represent Debugging Information in an a.out we need several quite
  106.    different categories of information spread across various
  107.    ELF object file sections.
  108.    
  109.      A.  Information about code and data variables.
  110.          DWARF information is a tree of Debugging Information Entries (DIEs).
  111.          Each tree entry (Die) has a TAG which identifies what type
  112.          of entry it is and Attributes which give the details.
  113.          DIEs at the global level in a compilation unit are tied together
  114.          with Sibling Pointers.
  115.          Siblings are equal-level DIEs.
  116.          Children, on the other hand, are *owned* DIEs.
  117.          Lets adopt the following symbols for DIE relationships:
  118.            Sibling pointer  ->
  119.    
  120.            Child pointer    |
  121.                             v
  122.    
  123.          Here is a representation of the DIEs for t.c where types are
  124.          left out to keep things simple (they don't change this, they
  125.          are just more DIEs to clutter things up):
  126.          t.c:
  127.            int foo(int i, int j) {  return 3;}
  128.            int goo;
  129.    
  130.    
  131.            Compilation_Unit
  132.                    |
  133.                    v
  134.                    function "foo"   -> global variable "goo "
  135.                    |
  136.                    v
  137.                    parameter "i"    -> parameter "j"
  138.    
  139.            This goes in the .debug_info section with a tiny amount
  140.            of supporting data in .debug_abbrev
  141.      B.  Information about the mapping from code addresses to source
  142.          A separate section holds a very compact mapping from
  143.          code addresses to source lines (and columns).
  144.            This is in the .debug_line section.
  145.      C.  Information about C Macros
  146.          If desired, all C Macro #defines and #undef-s and
  147.          #includes are recorded, with
  148.          the mapping back to the source files.
  149.            This is in the .debug_macinfo section.
  150.      D.  Information about unwinding stack frames
  151.          This is specially recorded in a section of its own: a seperate
  152.          small string of bytes per function/procedure.
  153.            This is in the .debug_frame section.
  154.    
  155.      Other .debug_* sections are for supporting data or for fast access to
  156.      global names, types, and statics.
  157.    
  158.